package com.abcdefg.logisticservice.listener;

import com.abcdefg.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "order.create")
public class ListenerOrder {
    @RabbitHandler
    public void orderIDMessage(String message) {
        System.out.println("接收到订单ID:"+message);
    }

    @RabbitHandler
    public void orderObjectMessage(OrderInfo orderInfo) {
        System.out.println("接收到的消息："+orderInfo.toString());
    }
}
